//
//  MycellModel.m
//  Cook
//
//  Created by Macbookpro on 15/4/20.
//  Copyright (c) 2015年 dingjun. All rights reserved.
//

#import "Mycell.h"

@implementation Mycell

- (void)dealloc
{
    [_label release];
    [_aImageView release];
    
    [super dealloc];
}

- (instancetype)initWithStyle:(UITableViewCellStyle)style reuseIdentifier:(NSString *)reuseIdentifier
{
    self = [super initWithStyle:style reuseIdentifier:reuseIdentifier];
    if (self) {
        _myAd = [AdapterModel getCGAdapter];
//        UIView *view = [[UIView alloc] initWithFrame:CGRectMake((self.frame.size.width / 2 - (175 * my.sWidth / 2) - 10), 10, 175 * my.sWidth, 50)];
//        view.layer.cornerRadius = 10.0;
//        [self.contentView addSubview:view];
        _aImageView = [[UIImageView alloc] initWithFrame:CGRectMake(10 * _myAd.sWidth, 10 * _myAd.sHeight, 30 * _myAd.sWidth, 30 * _myAd.sHeight)];
        [self addSubview:_aImageView];
        [_aImageView release];
        
        self.label = [[UILabel alloc] initWithFrame:CGRectMake(50 * _myAd.sWidth, 5 * _myAd.sHeight, 100 * _myAd.sWidth, 35 * _myAd.sHeight)];
        _label.textAlignment = NSTextAlignmentLeft;
        _label.textColor = [UIColor blackColor];
        [self addSubview:_label];
        
        [_label release];
//        [view release];
    }
    return self;
}

- (void)awakeFromNib {
    // Initialization code
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
